package com.pig4cloud.pig.module.mapper.charger;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.pig.common.mybatis.core.BaseMapperPlus;
import com.pig4cloud.pig.module.api.entity.charger.ChargerEstateBattery;
import com.pig4cloud.pig.module.api.entity.charger.ChargerOrder;
import com.pig4cloud.pig.module.api.entity.charger.ChargerOrderDetailedList;
import com.pig4cloud.pig.module.api.entity.charger.ChargerUsedBattery;
import com.pig4cloud.pig.module.api.entity.dto.ChargerOrderDTO;
import com.pig4cloud.pig.module.api.entity.dto.ChargerOrderEcharts;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Map;

/**
 * 订单Mapper接口
 *
 * @author ruoyi
 * @date 2022-05-07
 */
@Mapper
public interface ChargerOrderMapper extends BaseMapperPlus<ChargerOrder> {
	List<ChargerOrderDTO> selectChargerOrderTongji(Page page, @Param("map") Map<String, Object> map);
	List<ChargerOrderDTO> selectChargerOrderTongji(@Param("map") Map<String, Object> map);
	ChargerOrderDTO selectOrderTongjiByEstateId(@Param("map") Map<String, Object> map);
	List<ChargerUsedBattery> selectChargerUsedBattery(Page<ChargerUsedBattery> page, @Param("map") Map<String, Object> map);
	/**
	 *  判断表名是否存在
	 * @param tableName
	 * @return
	 */
	int isTableExist(@Param("tableName") String tableName);

	/**
	 * 大屏图标  进几个月
	 * @param map
	 * @return
	 */
	List<ChargerOrderEcharts> selectChargerOrderCharts(@Param("map") Map<String, Object> map);

	List<ChargerOrderDetailedList> selectChargerOrderDetailedList(@Param("map") Map<String, Object> map);

	List<ChargerEstateBattery> selectChargerEstateBattery(@Param("map") Map<String, Object> map);
}
